<!DOCTYPE html>
<html>
<head>
    <title>Sync XHR Test</title>
</head>
<body>
    <span id="progress">Loading...</span>

    <script type="text/javascript">
        // Set timeout to show the page before causing the deadlock
        setTimeout(function () {
            var xhr = new XMLHttpRequest();
            xhr.open('GET', '/sync.htm', /* async */ false);
            xhr.onload = function () {
                /* this will never be called... */
                document.getElementById('progress').textContent = 'Success';
                window.external.notify('Success');
            };
            xhr.onerror = function () {
                /* this will never be called... */
                document.getElementById('progress').textContent = 'Error';
                window.external.notify('Error');
            };
            xhr.send();
        }, 1);
    </script>
</body>
</html>